@import './element-variables.scss';
// 链接文字
.link {
  color: #fdfdfe;
  text-decoration: none;

  &:hover {
    cursor: pointer;
    color: $--color-primary;

    * {
      text-decoration: underline;
    }

    i {
      text-decoration: none;
    }
  }

  &.b {
    color: #333;

    &:hover {
      color: #42B983;
      text-decoration: none;
      background-color: #f5f7fa;
    }
  }
}

// 滑块
.drag {
  position: absolute;
  background-color: #014280;
  color: $--color-white;
  right: -10px;
  top: 50%;
  width: 10px;
  height: 30px;
  line-height: 30px !important;
  font-size: 10px;
  text-align: center;
  border-radius: 0 3px 3px 0;
  margin-top: -15px;
  box-sizing: border-box;
  cursor: col-resize;
  z-index: 3;

  &:before {
    margin-left: -1.4px;
    content: '';
    background: url('../img/drag.png') no-repeat center center/100% 55%;
    height: 100%;
    width: 100%;
    display: block;
  }
}

// 展开的下拉列表
.el-select-dropdown {
  user-select: none;

  .el-select-dropdown__wrap {
    max-height: 186px;
  }

  &.is-multiple {
    .el-select-dropdown__item {
      font-size: 14px;

      &.selected::after {
        display: none;
      }

      &::before {
        content: '';
        display: inline-block;
        height: 12px;
        width: 12px;
        border: 1px solid #dce0e2;
        margin-right: 10px;
        vertical-align: text-bottom;
      }

      &.selected {
        &::before {
          background: url('../img/dj.png') no-repeat center/10px auto;
        }
      }
    }
  }

  .el-select-dropdown__item {
    font-size: 14px;
  }
}

// msg
.el-message {
  max-width: 90vw;
  min-width: 400px !important;
  user-select: none;

  .el-message__icon {
    font-size: 14px;
  }

  .el-message__content {
    line-height: 1.2;
  }
}

// 表格控件
.con-el-table {
  display: flex;
  flex-direction: column;
  flex-grow: 1000;
  border: none;

  &.el-table--border {
    border: none;
  }

  &:before {
    display: none;
  }

  &:after {
    display: none;
  }

  &.el-table {
    .el-table__header {
      border-top: 1px solid #e3e3e3;

      tr {
        &:first-of-type {
          th {
            &:first-of-type {
              border-left: 1px solid #e3e3e3;
            }
          }
        }
      }

      th {
        background-color: #F5F7FA;
        color: #666;
        border-color: #DFE6EC !important;
        border-width: 1px !important;
        box-sizing: border-box;
        font-weight: 400;
        line-height: 1;
        padding: 6px 0;
        font-size: 12px;

        .cell {
          padding: 0 10px;
          line-height: 20px;
          display: flex;
          align-items: center;

          .caret-wrapper {
            width: 20px;
            height: 22px;
            display: inline-flex;
            justify-content: space-between;
            margin-left: 5px;

            .sort-caret {
              width: 10px;
              height: 10px;
              position: static;

              &.ascending {
                order: 1;
              }

              &.descending {
                order: 2;
              }
            }
          }
        }

        &.gutter {
          display: table-cell !important;
          border-right: 0;
        }
      }

      &.is-group {
        th {
          background-color: #F5F7FA;
          color: #666;
          border-left: 1px solid #DFE6EC;
          border-top: 1px solid #DFE6EC;
          box-sizing: border-box;
          font-weight: 400;
          line-height: 1;
          padding: 6px 0;
          font-size: 12px;

          &.gutter {
            display: table-cell !important;
          }
        }
      }
    }

    .el-table th.gutter {
      display: table-cell !important;
    }

    .el-table__body-wrapper {
      border: none;
      flex-grow: 1000;

      .el-table__body {
        border-left: 1px solid #e3e3e3;
        table-layout: auto;

        tr {
          td {
            padding: 5px 0;
            border-right: 1px solid #eee;
            box-sizing: border-box;
            font-size: 12px;

            .el-table-img {
              width: 100%;
              max-height: 84px;
              display: block;

              &.err-img {
                max-width: 23px;
              }
            }

            .cell {
              min-height: 10px;

              > * {
                margin: 0;
              }
            }

            &.edit-cell {
              padding: 1px;
              box-sizing: border-box;

              .cell {
                padding: 0;
                width: 100%;
                box-sizing: border-box;
                display: flex;
                align-items: center;

                .el-date-editor {
                  position: relative;
                  display: inline-block;
                  text-align: left;
                }

                .el-range-editor {
                  // overflow: hidden;
                  &.el-input__inner {
                    display: flex !important;
                    align-items: center;
                    justify-content: flex-start;
                    padding: 0;
                    height: 32px;
                    line-height: 32px;
                    overflow: visible;

                    * {
                      height: 26px;
                      line-height: 26px;
                    }
                  }

                  .el-input__icon {
                    width: 15px;
                    font-size: 14px;
                    margin: 0 0 0 5px;
                    flex-shrink: 0;

                    &.el-range__close-icon {
                      margin: 0;
                    }
                  }

                  .el-range-input {
                    // width: 112px;
                    width: 0;
                    flex: 1;
                    flex-grow: 10;
                    text-align: center;
                  }

                  .el-range-separator {
                    font-size: 12px;
                    padding: 0 2px;
                    width: 16px;
                    line-height: 26px !important;
                  }

                  .el-input__prefix {
                    color: $--color-primary;
                  }

                  &.el-input--prefix {
                    .el-input__inner {
                      padding-left: 10px;
                    }
                  }

                  .el-input__suffix {
                    right: 20px;
                  }

                  .el-range__icon {
                    color: $--color-primary;
                  }

                  .el-range__close-icon {
                    font-size: 14px;
                  }

                  input,
                  select {
                    width: 100%;
                    // border: 0.10px solid rgba(219, 219, 219, 1);
                    border: none;
                    background-color: rgba(0, 0, 0, 0);
                    color: #666;
                    font-size: 12px;
                    height: 30px;
                    line-height: 30px;
                    padding: 0 10px;
                    box-sizing: border-box;

                    &[type='checkbox'] {
                      height: 15px;
                    }

                    &:focus {
                      outline: none;
                      border: none !important;
                      background-color: none;
                    }
                  }
                }

                .el-date-editor.el-input,
                .el-date-editor.el-input__inner {
                  width: auto;
                }

                .el-date-editor--monthrange.el-input,
                .el-date-editor--monthrange.el-input__inner {
                  width: auto;
                }

                .el-date-editor--daterange.el-input,
                .el-date-editor--daterange.el-input__inner,
                .el-date-editor--timerange.el-input,
                .el-date-editor--timerange.el-input__inner {
                  width: auto;
                }

                .el-date-editor--datetimerange.el-input,
                .el-date-editor--datetimerange.el-input__inner {
                  width: auto;
                }

                input,
                select {
                  width: 100%;
                  // border: 0.10px solid rgba(219, 219, 219, 1);
                  border: none;
                  background-color: rgba(0, 0, 0, 0);
                  color: #666;
                  font-size: 12px;
                  height: 30px;
                  line-height: 30px;
                  padding: 0 10px;
                  box-sizing: border-box;

                  &[type='checkbox'] {
                    height: 15px;
                  }

                  &:focus {
                    outline: none;
                    border: 1px solid #37afff;
                    background-color: #eee;
                  }
                }

                * {
                  border-radius: 0;
                  line-height: 1;
                }
              }

              &.is-right {
                * {
                  text-align: right;
                }
              }

              .el-tooltip {
                padding: 0;
                width: 100%;
                box-sizing: border-box;
                display: flex;
                align-items: center;

                .el-table__expand-icon {
                  display: flex;
                  align-items: center;
                  justify-content: center;
                  // width: 10px;
                }

                input,
                select {
                  width: 100%;
                  // border: 0.10px solid rgba(219, 219, 219, 1);
                  border: none;
                  background-color: rgba(0, 0, 0, 0);
                  color: #666;
                  font-size: 12px;
                  height: 30px;
                  line-height: 30px;
                  padding: 0 10px;
                  box-sizing: border-box;

                  &[type='checkbox'] {
                    height: 15px;
                  }

                  &:focus {
                    outline: none;
                    border: 1px solid #37afff;
                    background-color: #eee;
                  }
                }
              }
            }

            &.bt-info {
              .cell {
                padding: 0 1px;

                > span {
                  padding-left: 10px;
                }

                .el-input {
                  border-radius: 0;

                  .el-input__inner {
                    border-radius: 0;
                  }
                }
              }
            }

            &.is-center {
              .cell {
                > span {
                  padding: 0;
                }
              }
            }
          }

          &.current-row {
            td {
              //取消table点击行 字体高亮
              // background-color: #e3e3e3;
              // color: $--color-primary;
            }
          }
        }
      }

      .el-table__empty-block {
        align-items: flex-start;

        .el-table__empty-text {
          padding: 20px 0 0;
          line-height: 1;
        }
      }
    }
  }
}

.el-input--mini {
  .el-input__inner {
    height: 32px;
    line-height: 32px;
  }
}

// 密码组件
.newPwd {
  .el-input__inner {
    border-color: #dcdfe6 !important;
  }
}

.pwdMsg {
  margin: 5px 0 !important;
  color: #333333 ;

  p {
    line-height: 16px;
    font-size: 12px;

    &:before {
      content: '';
      display: inline-block;
      width: 4px;
      height: 4px;
      background: #37B0FF;
      border-radius: 50%;
      vertical-align: top;
      margin-top: 6px;
      margin-right: 5px;
    }

    &.lightHeigh {
      color: #ff0000;

      &:before {
        background: #ff0000;
      }
    }
  }
}

// 树状图
.multipleTable {
  .el-table {
    width: 60%;

    .el-table__header {
      width: 100% !important;
      table-layout: inherit;
    }

    .el-table__body {
      width: 100% !important;

      td {
        &:first-of-type {
          width: 50px !important;

          .cell {
            width: 50px !important;
          }
        }
      }
    }

    [class*='el-table__row--level'] {
      .el-table__expand-icon {
        margin-right: 5px;
      }
    }

    .el-table__header-wrapper {
      tr {
        &:nth-of-type(2) {
          display: none;
        }
      }
    }

    .el-table--enable-row-transition {
      .el-table__body {
        td {
          &:first-of-type {
            border-right: 1px !important;
          }
        }
      }
    }

    th {
      padding: 6px 0;

      > .cell {
        font-weight: 400;
        font-size: 12px;
        color: #666;
      }

      &:first-of-type {
        border-left: rem !important;
      }
    }

    td {
      padding: 6px 0;

      &:first-of-type {
        border-right: rem !important;
      }
    }

    .el-icon-arrow-right {
      width: 13px;
      height: 13px;
      color: #808182;

      &:before {
        content: '\e791';
        margin-left: 1px;
      }
    }

    .el-table--group {
      &:after {
        width: rem;
      }
    }

    .powerBtn {
      margin-left: 40px;
    }
  }
}

// 多选框
.el-checkbox {
  color: #333;

  .el-checkbox__label {
    font-size: 12px;
  }
}

// 多行文本
.el-textarea {
  .el-textarea__inner {
    padding: 5px 10px;
  }

  // 滚动条
  ::-webkit-scrollbar {
    /*整体*/
    width: 15px !important;
    height: 5px;
  }

  ::-webkit-scrollbar-thumb {
    /*滑块*/
    background: #e6e6e6;
    border-radius: 2.5px;
  }

  ::-webkit-scrollbar-track {
    /*轨道*/
    border-radius: 2.5px;
    background: #f2f2f2;
  }
}

// ?
.disnone {
  input {
    border: 1px solid #dcdfe6 ;
    padding-left: 15px;
  }
}

.ck-content {
  overflow: auto;
}

.edui-editor {
  box-sizing: border-box;
  border-radius: 0;
}

.el-date-editor {
  .el-input__prefix {
    color: $--color-primary;
  }
}

.el-range-editor {
  // overflow: hidden;
  &.el-input__inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    height: 32px;
    line-height: 32px;
    overflow: visible;

    * {
      height: 26px;
      line-height: 26px;
    }
  }

  .el-input__icon {
    width: 15px;
    font-size: 14px;
    margin: 0 0 0 5px;
    flex-shrink: 0;

    &.el-range__close-icon {
      margin: 0;
    }
  }

  .el-range-input {
    // width: 112px;
    width: 0;
    flex: 1;
    flex-grow: 10;
    text-align: center;
  }

  .el-range-separator {
    font-size: 12px;
    padding: 0 2px;
    width: 16px;
  }

  .el-input__prefix {
    color: $--color-primary;
  }

  &.el-input--prefix {
    .el-input__inner {
      padding-left: 10px;
    }
  }

  .el-input__suffix {
    right: 20px;
  }

  .el-range__icon {
    color: $--color-primary;
  }

  .el-range__close-icon {
    font-size: 14px;
  }
}

.el-year-table {
  td {
    .cell {
      font-weight: bold;
    }
  }
}

.el-input {
  max-width: 100%;
  border-radius: 0;

  .el-input__inner {
    border-radius: 3px;
  }
}

.el-input-number {
  max-width: 100%;
  width: 100%;

  .el-input__inner {
    text-align: left;
  }
}

.el-textarea {
  .el-textarea__inner {
    border-radius: 0;
  }
}

// 上传组件
.el-upload {
  text-align: left;
}

.el-upload__tip {
  font-size: 12px;
  display: inline;
  margin: 10px 0 0 10px;
  user-select: none;
  white-space: pre-wrap;

  &:empty {
    margin: 0;
  }
}

.el-upload-list {
  margin: 10px 0 -10px 0;
  user-select: none;

  &:empty {
    margin: 0;
  }

  &.el-upload-list--text {
    .el-upload-list__item {
      line-height: 1;
      padding: 3px 0;
      margin-bottom: 10px;

      &:first-child {
        margin-top: 10px;
      }

      .el-upload-list__item-name {
        color: #666;
        line-height: 1.5;
      }

      .el-upload-list__item-status-label {
        top: 7px;
      }

      .el-progress {
        position: inherit;
        top: 0;
      }

      .el-icon-close {
        top: 3px;
      }
    }
  }

  &.el-upload-list--picture {
    display: flex;
    flex-wrap: wrap;

    .el-upload-list__item {
      padding: 0;
      border-radius: 0;
      height: auto;
      width: 190px;
      // max-width: 20rem;
      max-height: 140px;
      margin: 0 10px 10px 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #eee;

      .el-upload-list__item-thumbnail {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        margin: 0;
      }

      .el-upload-list__item-name {
        display: none;
      }

      .el-upload-list__item-status-label {
        display: none;
      }

      .el-icon-close {
        z-index: 1;
        left: 0;
        top: 0;
        right: auto;
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.5);
        padding: 2px;

        &::before {
          content: '删除';
          color: #fff;
          font-size: 12px;
        }
      }
    }
  }
}

// 即将淘汰
.el-upload-v2 {
  .el-icon-document {
    display: none;
  }

  .upload_readonly {
    width: 300px;
  }

  .el-upload-list__item-name {
    margin-right: 40px;
    width: 260px;
    color: #666;
  }

  .el-icon-close {
    .el-icon-close-tip {
      display: none;
    }

    &::before {
      color: #000;
      content: '删除';
    }
  }

  .downFont {
    font-size: 14px;
    display: inline-block;
    width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    a {
      color: #0f86d3;
    }

    .split {
      &::before {
        content: '';
        display: block;
      }
    }
  }
}

// 即将淘汰
.upload-img {
  user-select: none;

  > img {
    max-width: 100%;
  }

  .view {
    overflow: hidden;

    img {
      border: 1px solid #dcdfe6;
      max-width: 100%;
      display: block;
      height: 140px;
      margin-right: 20px;
      margin-bottom: 20px;
      float: left;
    }
  }

  .el-upload {
    position: relative;
    z-index: 2;
  }

  .tip-pan {
    margin-top: -30px;
    position: relative;
    overflow: hidden;

    .tip {
      margin-left: 80px;
      line-height: 1;
      padding: 9px 0 9px 9px;
      color: #666;
      margin-bottom: 10px;
      min-height: 32px;
    }

    .ts-pan {
      float: left;
      position: relative;
      margin-right: 20px;
      margin-bottom: 20px;
      width: 100%;
      border: 1px solid #dcdfe6;
      border-radius: 3px;

      span {
        position: absolute;
        top: 0;
        left: 0;
        background: rgba(0, 0, 0, 0.5);
        width: 36px;
        height: 29px;
        color: $--color-white;
        text-align: center;
        font-size: 12px;
        cursor: pointer;

        &:hover {
          background-color: rgba(0, 0, 0, 0.8);
        }
      }

      .tip-txt {
        position: absolute;
        top: -42px;
        left: 80px;
        color: #999;
        padding-left: 10px;
        font-size: 12px;
      }

      .up-img {
        border: 1px solid #dcdfe6;
        display: block;
        max-height: 140px;
        max-width: 100%;
      }
    }
  }

  .del {
    cursor: pointer;
    font-size: 12px;
    color: #ccc;

    &:hover {
      color: #333;
      text-decoration: underline;
    }
  }
}

.el-select {
  width: 100%;

  .el-select__tags {
    > span {
      display: flex;
      flex-wrap: wrap;

      .el-tag {
        display: flex;
        justify-content: space-between;
        align-items: center;

        &.el-tag--info {
          border: 0;
        }

        .el-icon-close::before {
          color: $--color-white;
        }
      }
    }
  }
  .el-loading-spinner {
    text-align: left;
    top: 50%;
    left: 5px;
    margin-top: 0;
    transform: translateY(-50%);
    svg {
      height: 25px;
      width: 25px;
    }
  }
}

.el-cascader {
  .el-cascader__tags {
    .el-tag {
      .el-tag__close {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        width: 16px;
        height: 16px;
        line-height: 1;
      }
    }
  }
}

.el-switch {
  padding-top: 6px;
  height: 28px;
  line-height: 20px;
}

.el-radio-group {
  padding-top: 10px;

  .el-radio__input {
    .el-radio__inner {
      width: 12px;
      height: 12px;
    }
  }

  .el-radio__label {
    font-size: 12px;
  }
}

.el-txt {
  color: #555;
  // overflow: auto;
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  word-wrap: break-word;
  align-items: flex-start;
  min-height: 28px;
  .img {
    border: 1px solid #eee;
    width: 190px;
    height: auto;
    // max-height: 14rem;
    display: flex;
    align-items: center;

    img {
      width: 100%;
      display: block;
      border: 1px solid #eee;
    }
  }

  a.link {
    color: $--color-primary;
    text-decoration: none;
    line-height: 1.2;
    width: 100%;
    &:not(:last-child) {
      margin-bottom: 10px;
    }
    &:hover {
      text-decoration: underline;
    }

    &:after {
      content: ',';
      margin-right: 10px;
    }

    &:last-of-type {
      &::after {
        display: none;
      }
    }
  }

  > * {
    margin: 0;
  }
}

.el-form-item__error {
  top: auto;
  left: auto;
  position: relative;
}
